﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace BDSim
{
    class IonMapDLL
    {
        /// <summary>
        /// 把VTEC转为STEC，再转换为延迟距离,单位为米
        /// </summary>
        /// <param name="VTEC">穿刺点处的VTEC，垂直电子总量</param>
        /// <param name="Frequency">信号频率，单位为MHz</param>
        /// <param name="ldzenith">穿刺点处的天顶距,单位为度</param>
        /// <param name="IMap">映射模型选择，0表示不计算，1表示用三角函数模型（1/cos（ldzenith））</param>
        /// <param name="Iondelay">电离层延迟值，单位为米</param>
        /// <returns></returns>
        [DllImport("IonMapDLL.dll", EntryPoint = "Ion_VTEC2DST", CallingConvention = CallingConvention.Cdecl)]
        public static extern int Ion_VTEC2DST(double VTEC, double Frequency, double ldzenith, int IMap, out double Iondelay);
    }
}
